<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class FavoriteModel extends BaseModel
{
    protected $table='user_favorite';
    public $timestamps = false;
    protected $guarded = [];

    public function IsFocusCollect($uuid, $cid)
    {
        $res =  FavoriteModel::where(['uid' =>$uuid,'cid' =>$cid]) ->get();

        if(count($res) > 0){//成功！
            return ['code' => true,'data' => true];
        }else{
            return ['code' => false,'data' => false];
        }
    }
    //
}
